<%@ page language="java" import="java.util.*"
	contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@page import="com.ambow.entity.*"%>
<%@page import="com.ambow.dao.*"%>
<%@page import="com.ambow.utils.PageResults"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<title>Contact</title>
<link href="<%=path%>/pages/css/bootstrap.css" rel="stylesheet"
	type="text/css" media="all" />
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="<%=path%>/pages/js/jquery.min.js"></script>
<!-- Custom Theme files -->
<!--theme-style-->
<link href="<%=path%>/pages/css/style.css" rel="stylesheet"
	type="text/css" media="all" />
<!--//theme-style-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords"
	content="I-wear Responsive web template, Bootstrap Web Templates, Flat Web Templates, Andriod Compatible web template, 
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson, Motorola web design" />
<script type="application/x-javascript">
	
	
	 addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } 


</script>
<script type="text/javascript" src="<%=path%>/pages/js/move-top.js"></script>
<script type="text/javascript" src="<%=path%>/pages/js/easing.js"></script>
<!--fonts-->
<link href='http://fonts.useso.com/css?family=Lato:100,300,400,700,900'
	rel='stylesheet' type='text/css'>
<link href='http://fonts.useso.com/css?family=Montez' rel='stylesheet'
	type='text/css'>
<!--//fonts-->
<script src="<%=path%>/pages/js/simpleCart.min.js">
	
</script>
<!-- start menu -->
<link href="<%=path%>/pages/css/memenu.css" rel="stylesheet"
	type="text/css" media="all" />
<script type="text/javascript" src="<%=path%>/pages/js/memenu.js"></script>
<script>
	$(document).ready(function() {
		$(".memenu").memenu();
	});
</script>
<!-- /start menu -->
<!-- Bootstrap core JavaScript
    ================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<!-- js -->
<script src="<%=path%>/pages/js/bootstrap.js"></script>
<!-- js -->

<style type="text/css">
* {
	margin: 0;
	padding: 0;
	-webkit-touch-callout: none;
	/* prevent callout to copy image, etc when tap to hold */
	-webkit-text-size-adjust: none;
	/* prevent webkit from resizing text to fit */
	-webkit-tap-highlight-color: rgba(210, 210, 210, 0.35);
	/* make transparent link selection, adjust last value opacity 0 to 1.0 */
	-webkit-user-select: none;
	/* prevent copy paste, to allow, change 'none' to 'text' */
}

#table-4 thead, #table-4 tr {
border-top-width: 1px;
border-top-style: solid;
border-top-color: rgb(211, 202, 221);

}
#table-4 {
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: rgb(211, 202, 221);
}

/* Padding and font style */
#table-4 td, #table-4 th {
padding: 5px 10px;
font-size: 12px;
font-family: Verdana;
color: rgb(95, 74, 121);
}

/* Alternating background colors */
#table-4 tr:nth-child(even) {
background: rgb(223, 216, 232)
}
#table-4 tr:nth-child(odd) {
background: #FFF
}

</style>



</head>
<body>
	<!--header-->
	<div class="header-info">
		<div class="container">
			<div class="header-top-in">

				<ul class="support">
					<li><a href="mailto:info@example.com"><i
							class="glyphicon glyphicon-envelope"> </i>info@example.com</a></li>
					<li><span><i class="glyphicon glyphicon-earphone"
							class="tele-in"> </i>0 462 261 61 61</span></li>
				</ul>
				<ul class=" support-right">
					<%
						User user = (User) session.getAttribute("login");
						if (user != null) {
					%>
					<li><a href="user.jsp"> <i
							class="glyphicon glyphicon-lock" class="tele"> </i><%=user.getAccount()%></a>
					</li>
					<%
						if (user.getDegree().equals("admin")) {
					%>
					<li><a href="pages/manager.jsp"> <i
							class="glyphicon glyphicon-lock" class="tele"> </i>MANAGER
					</a></li>
					<%
						}
					%>
					<li></li>
					<a href="UserServlet?status=exit"><img alt="#"
						src="<%=path%>/static/images/exit.png"></a>
					<%
						} else {
					%>
					<li><a href="pages/account.jsp"> <i
							class="glyphicon glyphicon-lock" class="tele"> </i>LOGIN
					</a></li>
					<li><a href="pages/register.jsp"> <i
							class="glyphicon glyphicon-lock" class="tele"> </i>REGISTER
					</a></li>
					<%
						}
					%>
				</ul>
				<div class="clearfix"></div>
			</div>
		</div>
	</div>
	<div class="header header5">
		<div class="header-top">

			<div class="header-bottom">
				<div class="container">
					<div class="logo">
						<h1>
							<a href="index.jsp">I-<span>wear</span></a>
						</h1>
					</div>

					<div class="top-nav">
						<ul class="memenu skyblue">
							<li class="active"><a href="<%=path%>/index.jsp">首页</a></li>
							<li class="grid"><a href="#">男性</a>
								<div class="mepanel">
									<div class="row">
										<div class="col1 me-one">
											<h4>品类</h4>
											<ul>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllT&type=太阳眼镜&kind=男性">太阳眼镜</a></li>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllT&type=时尚风镜&kind=男性">时尚风镜</a></li>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllT&type=经典护目镜&kind=男性">经典护目镜</a></li>

											</ul>
										</div>
										<div class="col1 me-one">
											<h4>款式</h4>
											<ul>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllL&label=复古&kind=男性">复古款</a></li>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllL&label=潮流&kind=男性">潮流款</a></li>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllL&label=经典&kind=男性">经典款</a></li>

											</ul>
										</div>
										<div class="col1 me-one">
											<h4>流行品牌</h4>
											<ul>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllB&brand=Levis&kind=男性">Levis</a></li>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllB&brand=Persol&kind=男性">Persol</a></li>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllB&brand=Nike&kind=男性">Nike</a></li>

											</ul>
										</div>
									</div>
								</div></li>
							<li class="grid"><a href="#">女性</a>
								<div class="mepanel">
									<div class="row">
										<div class="col1 me-one">
											<h4>品类</h4>
											<ul>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllT&type=太阳眼镜&kind=女性">太阳眼镜</a></li>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllT&type=时尚风镜&kind=女性">时尚风镜</a></li>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllT&type=经典护目镜&kind=女性">经典护目镜</a></li>

											</ul>
										</div>
										<div class="col1 me-one">
											<h4>款式</h4>
											<ul>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllL&label=复古&kind=女性">复古款</a></li>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllL&label=潮流&kind=女性">潮流款</a></li>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllL&label=经典&kind=女性">经典款</a></li>

											</ul>
										</div>
										<div class="col1 me-one">
											<h4>流行品牌</h4>
											<ul>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllB&brand=Levis&kind=女性">Levis</a></li>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllB&brand=Persol&kind=女性">Persol</a></li>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllB&brand=Nike&kind=女性">Nike</a></li>

											</ul>
										</div>
									</div>
								</div></li>
							<li class="grid"><a href="#">儿童</a>
								<div class="mepanel">
									<div class="row">
										<div class="col1 me-one">
											<h4>品类</h4>
											<ul>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllT&type=太阳眼镜&kind=儿童">太阳眼镜</a></li>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllT&type=时尚风镜&kind=儿童">时尚风镜</a></li>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllT&type=经典护目镜&kind=儿童">经典护目镜</a></li>

											</ul>
										</div>
										<div class="col1 me-one">
											<h4>款式</h4>
											<ul>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllL&label=复古&kind=儿童">复古款</a></li>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllL&label=潮流&kind=儿童">潮流款</a></li>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllL&label=经典&kind=儿童">经典款</a></li>

											</ul>
										</div>
										<div class="col1 me-one">
											<h4>流行品牌</h4>
											<ul>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllB&brand=Levis&kind=儿童">Levis</a></li>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllB&brand=Persol&kind=儿童">Persol</a></li>
												<li><a
													href="<%=path%>/ProductServlet?status=queryAllB&brand=Nike&kind=儿童">Nike</a></li>

											</ul>
										</div>

									</div>
								</div></li>
							<li class="grid"><a href="<%=path%>/Main">在线客服</a></li>
							<li class="grid"><a
								href="<%=path%>/NewsServlet?status=query&currentPage=0">关于我们</a>

							</li>
							<li class="grid"><a
								href="<%=path%>/LeaveMessageServlet?status=all&currentPage=0">留言板</a></li>
						</ul>
						<div class="clearfix"></div>
					</div>
					<div class="clearfix"></div>
					<!---->
				</div>
			</div>
		</div>
	</div>
	<!---->
	<div class="back">
		<h2>Contact</h2>
	</div>
	<form action="<%=path%>/pages/leavemessage.jsp" method="post">
		<p size="20px" align="center">所有留言</p>&nbsp; &nbsp;<p align="center" size="20px"><a style="margin-left: 22%" href="<%=path%>/pages/leavemessage.jsp">留言</a></p>
				</br>
				<center>	
			<table id="table-4" align="center">
			<!-- Replace "table-1" with any of the design numbers -->
			<thead id="table-4" align="center" style="">
				<th>留言者</th>
				<th>留言时间</th>
				<th>留言标题</th>
				<th>留言内容</th>
				<th>回复</th>
				<th>查看回复</th>
			</thead>
					<%
					PageResults<Message> pageResults = (PageResults) request.getAttribute("pageResults");
					List<Message> messages = pageResults.getResults();
					    Integer id=0;
						if (messages != null && messages.size() != 0) {
							for (int i = 0; i < messages.size(); i++) {
								id = messages.get(i).getId();
					%>
					<tbody align="center">
				<tr>
					<td ><input type="text" maxlength="20" value=<%=messages.get(i).getUser().getName()%>></td>
					<td><input type="text"  maxlength="20" value=<%=messages.get(i).getCreateTime()%>></td>
					<td><input type="text" maxlength="20" value=<%=messages.get(i).getTitle()%>></td>
					<td><textarea style="width:200px;height:80px;"><%=messages.get(i).getContent()%></textarea></td>
					<td> <a href="<%=path%>/pages/replay.jsp?id=<%=id%>">回复</a></td>
					<td><a href="<%=path%>/Postservlet?status=sall&id=<%=id%>&currentPage=0">查看回复</a></td>
				</tr>
			
					<%
						}
							%>
							</tbody>
			</table>
			</center>
					<% } else {
							response.sendRedirect("/LeaveMessageServlet?status=all");
						}
					%>
					<table width="90%" border="0" align="center" cellpadding="3"
							cellspacing="0" id="page">
							<tr>
								<td align="right">共有记录
									${requestScope.pageResults.getTotalCount()}条 第
									${requestScope.pageResults.getCurrentPage()}/
									${requestScope.pageResults.getPageCount()}页 <a
									href="<%=path%>/LeaveMessageServlet?status=all&currentPage=0"
									id="begin">首页</a> <a
									href="<%=path%>/LeaveMessageServlet?status=all&currentPage=${requestScope.pageResults.getCurrentPage()-1}"
									id="pre">上一页</a> <a
									href="<%=path%>/LeaveMessageServlet?status=all&currentPage=${requestScope.pageResults.getPageNo()}"
									id="next">下一页</a> <a
									href="<%=path%>/LeaveMessageServlet?status=all&currentPage=${requestScope.pageResults.getPageCount()}"
									id="end">末页</a>
								</td>
							</tr>
						</table>
				</div>
			</div>
		</div>
	</form>

	<div class="bottom-grid1">

		<div class="fit1">
			<h3>HAPPY SHOPPING</h3>
			<p>“I LIKE MY STYLE, BE REAL,BE UNIQUE.”</p>
		</div>
	</div>
	<!---->
	<!---->
	<script type="text/javascript">
		$(document).ready(function() {
			/*
			var defaults = {
			containerID: 'toTop', // fading element id
			containerHoverID: 'toTopHover', // fading element hover id
			scrollSpeed: 1200,
			easingType: 'linear' 
			};
			 */
			$().UItoTop({
				easingType : 'easeOutQuart'
			});
		});
	</script>
	<a href="#to-top" id="toTop" style="display: block;"> <span
		id="toTopHover" style="opacity: 1;"> </span></a>
	<!---->
	<!---->
</body>
</html>